<?php /* Smarty version 2.6.21, created on 2009-07-21 19:26:37
         compiled from log_list.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'log_list.tpl', 24, false),)), $this); ?>
<h1>Просмотр лога</h1>

<div style="width: 100%">
<div class="table_body">
<form id="filter" method="post" action="/backend/logview/" onsubmit="return false;">
<div class="filter_form" style="margin-bottom: 10px;">
<h3>фильтр</h3>
    <label for="date_from">дата с:</label> <input type="text" id="date_from" name="filter[date_from]" value="<?php echo $this->_tpl_vars['filter_date_from']; ?>
" readonly="readonly"> 
    <img src="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
img/calendar_delete.png" width="16" height="16" border="0" class="dateselector_clear" title="очистить дату" onclick="$('date_from').value='';">
    <img src="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
img/calendar.png" width="16" height="16" border="0" class="dateselector" id="date_from_pick" title="выбор даты">
    <label for="date_to" style="margin-left: 20px;">дата по:</label> <input type="text" id="date_to" name="filter[date_to]" value="<?php echo $this->_tpl_vars['filter_date_to']; ?>
"> 
    <img src="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
img/calendar_delete.png" width="16" height="16" border="0" class="dateselector_clear" title="очистить дату" onclick="$('date_to').value='';">
    <img src="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
img/calendar.png" width="16" height="16" border="0" class="dateselector" id="date_to_pick" title="выбор даты">
    <label for="object_name" style="margin-left: 20px;">имя:</label> <input type="text" id="object_name" name="filter[object_name]" value="<?php echo $this->_tpl_vars['filter_object_name']; ?>
">
    <label for="operation" style="margin-left: 20px;">операция:</label> 
    <select id="operation" name="filter[operation]" style="width: 100px; float: left; display: block;">
        <option value="">любая</option>
        <option value="insert" <?php if ($this->_tpl_vars['filter_operation'] == 'insert'): ?>selected<?php endif; ?>>добавление</option>
        <option value="update" <?php if ($this->_tpl_vars['filter_operation'] == 'update'): ?>selected<?php endif; ?>>изменение</option>
        <option value="delete" <?php if ($this->_tpl_vars['filter_operation'] == 'delete'): ?>selected<?php endif; ?>>удаление</option>
        <option value="error" <?php if ($this->_tpl_vars['filter_operation'] == 'error'): ?>selected<?php endif; ?>>ошибка</option>
    </select>
    <label for="manager_id" style="margin-left: 20px;">менеджер:</label>
    <?php echo smarty_function_html_options(array('name' => "filter[manager_id]",'id' => 'manager_id','options' => $this->_tpl_vars['UserManager']->htmlSelect('full_name','любой'),'selected' => $this->_tpl_vars['filter_manager_id'],'style' => "width: 150px; float: left; display: block;"), $this);?>

    <br clear="all">
    <label for="message" style="width: 170px;">сообщение (может быть долго):</label> <input type="text" id="message" name="filter[message]" value="<?php echo $this->_tpl_vars['filter_message']; ?>
" style="width: 300px;">
    <div class="operation">
        <a href="javascript:void(0);" onclick="$('clear').value = 1; window.sendForm.bind($('filter'), null, $('filter').readAttribute('action')).call();" class="delete    ">очистить</a>
        <a href="javascript:void(0);" onclick="$('clear').value = ''; window.sendForm.bind($('filter'), null, $('filter').readAttribute('action')).call();" class="accept">применить</a>
        <div style="clear: both;"></div>
    </div>
    <input type="hidden" id="clear" name="filter[_clear]" value="">
</div>
</form>

<table class="text">
<tr><th>&nbsp;</th><th>Объект</th><th>Имя объекта</th><th>Дата</th><th>Сообщение</th><th>&nbsp;</th></tr>
<?php $_from = $this->_tpl_vars['Logs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['Log']):
?>
<tr>
    <td>
        <img src="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
img/report_<?php echo $this->_tpl_vars['Log']->operation; ?>
.png" border="0" width="16" height="16">
    </td>
    <td><?php echo $this->_tpl_vars['Log']->object_type; ?>
[<?php echo $this->_tpl_vars['Log']->object_id; ?>
]</td>
    <td><?php echo $this->_tpl_vars['Log']->object_name; ?>
</td>
    <td class="mixed"><?php echo $this->_tpl_vars['Log']->date; ?>
</td>
    <td><?php echo $this->_tpl_vars['Log']->message; ?>
</td>
    <td>
        <?php if ($this->_tpl_vars['Log']->edit_link): ?>
            <a href="<?php echo $this->_tpl_vars['Log']->edit_link; ?>
" onclick="go('<?php echo $this->_tpl_vars['Log']->edit_link; ?>
'); return false;"><img src="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
img/report_go.png" border="0" width="16" height="16" title="Перейти к объекту"></a>
        <?php endif; ?>
    </td>
</tr>
<?php endforeach; endif; unset($_from); ?>
</table>
</div>
<?php if ($this->_tpl_vars['Logs']->hasPaginate()): ?>
<div id="log_paging" class="paging">
<?php echo $this->_tpl_vars['Logs']->showPager(false); ?>

<?php echo '
<script>
    new Pager("log_paging");
</script>
'; ?>

</div>
<?php endif; ?>
</div>

<?php echo '
<script>
    Calendar.setup({
        inputField : "date_from",
        ifFormat : "%Y-%m-%d %H:%M",
        button : "date_from_pick",
        align : "Bl",
        firstDay: 1,
        showsTime: true,
        singleClick : true
    });
    Calendar.setup({
        inputField : "date_to",
        ifFormat : "%Y-%m-%d %H:%M",
        button : "date_to_pick",
        align : "Bl",
        firstDay: 1,
        showsTime: true,
        showsTime: true,
        singleClick : true
    });
</script>
'; ?>